package com.base.cn.platform.os.service.manage.op.feedback;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 用户反馈接口
 * @author zsw
 * @create 2018-04-25
 */
@FeignClient(name = BaseService.appName , configuration = FeignAuthConfig.class)
public interface OpFeedbackService extends BaseService {

    /**
     * 查询用户反馈数量
     * @param feedback
     * @create 2018-04-25
     */
    @RequestMapping(contextPath + "/op/feedbackCount")
    BigDecimal count(@RequestBody Map<String, Object> feedback);

    /**
     * 查询用户反馈列表
     * @param currentPage 分页
     * @param feedback 查询条件
     * @create 2018-04-25
     */
    @RequestMapping(contextPath + "/op/queryFeedbackList")
    Map<String,Object> queryFeedbackList(@RequestParam(value = "currentPage", required = false, defaultValue = "1") int currentPage,
                                         @RequestBody Map<String, Object> feedback);

    /**
     * 保存/更新用户反馈
     * @param feedback 反馈实体
     * @create 2018-04-27
     */
    @RequestMapping(contextPath + "/op/saveUpdateFeedback")
    Map<String ,Object> saveUpdateFeedback(@RequestBody Map<String, Object> feedback);

    /**
     * 删除用户反馈
     * @param feedbackIds 反馈Id串
     * @create 2018-04-27
     */
    @RequestMapping(contextPath + "/op/deleteFeedback")
    Map<String,Object> deleteFeedback(@RequestParam("feedbackIds") String feedbackIds);

    /**
     * 查看反馈详情
     * @param feedbackId 反馈ID
     * @create 2018-04-27
     * @return
     */
    @RequestMapping(contextPath + "/op/findFeedbackById")
    Map<String, Object> showFeedbackInfo(@RequestParam("feedbackId") BigDecimal feedbackId);
}
